/**
 * @date 4:16:38 PM
 * EducationAdminServiceImpl.java
 * Administrator
 * TODO
 */
package com.qs.education.service.impl;

import org.springframework.stereotype.Service;

import com.qs.education.bean.beans.EducationAdminResponse;
import com.qs.education.bean.beans.EducationTeacherResponse;
import com.qs.education.bean.service.BaseService;
import com.qs.education.service.IAdminService;

/**
 * @class EducationAdminServiceImpl
 * @author Brooks
 * @description 
 * @date Oct 17, 2018
 */
@Service
public class AdminServiceImpl extends BaseService implements IAdminService{

	/**
	 * @description 根据用户名和密码得到当前管理员
	 * @user Brooks
	 * @date Oct 17, 2018
	 * @return EducationAdminBean
	 */
	public EducationAdminResponse getEducationAdmin(String name, String password) {
		EducationAdminResponse educationAdmin = apiCaller.getAdmin(name,password);
		return educationAdmin;
	}

	@Override
	public EducationAdminResponse findAdminByName(String name) {
		//EducationAdmin admin = iEducationAdminDao.findAdminByName(name);
		EducationAdminResponse admin = apiCaller.findAdminByName(name);
		return admin;
	}

	@Override
	public EducationAdminResponse updateAdmin(String name ,String oldPassword, String newPassword) {
		
		return apiCaller.updateAdmin(name,oldPassword,newPassword);
	}
	

}
